<!DOCTYPE html>
<html>

<head>
    <meta name="layout" content="main2" />
    <g:set var="entityName" value="${message(code: 'attachment.label', default: 'Attachment')}" />
    <title>附件：${attachment?.type?.name}</title>
</head>

<body>
  <div class="main-body">
    <div class="page-wrapper">
      <div class="page-header">
        <div class="page-header-title">
            <h4>编辑客户</h4>
        </div>

        <div class="page-header-breadcrumb">
            <ul class="breadcrumb-title">
                <li class="breadcrumb-item">
                    <a href="/salesDashboard/index">
                        <i class="icofont icofont-home"></i>
                    </a>
                </li>

                <li class="breadcrumb-item">附件描述编辑</li>
            </ul>
        </div>
    </div>
    <div class="page-body">
      <g:if test="${flash.message}">
          <div class="message" role="status">${flash.message}</div>
      </g:if>
      <g:hasErrors bean="${this.attachment}">
          <ul class="errors" role="alert">
              <g:eachError bean="${this.attachment}" var="error">
                  <li <g:if test="${error in org.springframework.validation.FieldError}">data-field-id="${error.field}"</g:if>>
                      <g:message error="${error}" />
                  </li>
              </g:eachError>
          </ul>
      </g:hasErrors>
      <div class="card">
        <div class="card-header">
          <h5>附件描述编辑</h5>
          <div class="card-header-right">
              <i class="icofont icofont-rounded-down"></i>
          </div>

        </div>
        <div class="card-block">
          <g:form resource="${this.attachment}" method="PUT" class="form-horizontal">
          <g:textField class="hidden" name="targetUri" value="${targetUri}"></g:textField>

              <div class="form-group row">

                 <label class="col-md-3 control-label">图片描述</label>

                  <div class="col-md-4 input-group">
                      <input type="hidden" name="attachmentTypeName" value="${this.attachmentTypeName}">
                      <g:textField class="form-control" name="description"
                                       value="${this.attachment?.description}"/>
                  </div>
              </div>
              <div class="form-group row">
                  <div class="col-md-12 ">
                      <button type="submit" class="btn btn-info">保存</button>
                  </div>
              </div>
          </g:form>
        </div>
      </div>
    </div>

    </div>

    </div>
</body>
</html>
